<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <meta name="twitter:site" content="@metroui">
    <meta name="twitter:creator" content="@pimenov_sergey">
    <meta name="twitter:card" content="summary">
    <meta name="twitter:title" content="Metro 4 Components Library">
    <meta name="twitter:description" content="Metro 4 is an open source toolkit for developing with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with responsive grid system, extensive prebuilt components, and powerful plugins  .">
    <meta name="twitter:image" content="https://metroui.org.ua/images/m4-logo-social.png">

    <meta property="og:url" content="https://metroui.org.ua/v4/index.html">
    <meta property="og:title" content="Metro 4 Components Library">
    <meta property="og:description" content="Metro 4 is an open source toolkit for developing with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with responsive grid system, extensive prebuilt components, and powerful plugins  .">
    <meta property="og:type" content="website">
    <meta property="og:image" content="https://metroui.org.ua/images/m4-logo-social.png">
    <meta property="og:image:secure_url" content="https://metroui.org.ua/images/m4-logo-social.png">
    <meta property="og:image:type" content="image/png">
    <meta property="og:image:width" content="968">
    <meta property="og:image:height" content="504">

    <meta name="author" content="Sergey Pimenov">
    <meta name="description" content="Discover image with image magnifier component. The most popular HTML, CSS, and JS library in Metro style.">
    <meta name="keywords" content="HTML, CSS, JS, Metro, CSS3, Javascript, HTML5, UI, Library, Web, Development, Framework">

    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
    <link rel="icon" href="favicon.ico" type="image/x-icon">

    <link href="metro/css/metro-all.css?ver=@@b-version" rel="stylesheet">
    <link href="highlight/styles/github.css" rel="stylesheet">
    <link href="docsearch/docsearch.min.css" rel="stylesheet">
    <link href="css/site.css" rel="stylesheet">

    <title>Image magnifier - Metro 4 :: Popular HTML, CSS and JS library</title>
</head>
<body class="m4-cloak">

<header data-role="html-container" data-insert-mode="replace" data-html-source="header.html"></header>

<div data-role="html-container" data-insert-mode="replace" data-html-source="sidebar-menu.html"></div>

<div class="container-fluid docs-content">

    <div class="row flex-xl-nowrap">

            <div class="d-none d-block-xl cell-xl-2 order-2 border-left bd-light toc-wrapper">
                <h5>Table of contents</h5>
                <hr/>
                <ul class="toc-nav">
                    <li class="toc-entry"><a href="#">Image magnifier</a></li>
                    <li class="toc-entry"><a href="#_im_about">About</a></li>
                    <li class="toc-entry"><a href="#_im_glass">Magnifier glass</a></li>
                    <li class="toc-entry"><a href="#_im_zoom">Magnifier zoom</a></li>
                    <li class="toc-entry"><a href="#_im_zooming">Zooming</a></li>
                    <li class="toc-entry"><a href="#_im_customize">Customize</a></li>
                </ul>

            </div>

            <main class="cell-xl-10 order-1 pr-1-sx pl-1-sx pr-5-md pl-5-md">
                <div class="place-right d-none d-block-lg" style="width: 200px;">
                    <img src="images/logo.png" class="w-100" alt="">
                </div>

                <h1>Image magnifier</h1>
                <p class="text-leader">
                    Discover image with image magnifier component.
                </p>

                <!-- ads-html -->

                <h3 id="_im_about">About</h3>
                <p>
                    You can discover image with <code>image-magnifier</code> component.
                    To create image magnifier, add role <code>data-role="imagemagnifier"</code> to container and put image in the container.
                    You can create two type of image magnifier: <code>glass</code> and <code>zoom</code>.
                </p>

                <h4 id="_im_glass">Image magnifier glass</h4>
                <p>
                    To create image magnifier <code>glass</code>, you must add attribute <code>data-magnifier-mode="glass"</code>.
                </p>
                <div class="example">
                    <div data-role="imagemagnifier" data-magnifier-mode="glass">
                        <img src="images/hopetoun_falls.jpg">
                    </div>
                </div>
                <pre><code class="html">
                    &lt;div data-role="imagemagnifier" data-magnifier-mode="glass"&gt;
                        &lt;img src="images/hopetoun_falls.jpg"&gt;
                    &lt;/div&gt;
                </code></pre>

                <p>
                    You can use attribute <code>data-lens-type</code> to set type of magnifier <code>lens</code>.
                    To set circle magnifier lens, use value <code>circle</code>.
                    To change size of the lens, use attribute <code>data-lens-size</code>.
                </p>
                <div class="example">
                    <div data-role="imagemagnifier" data-magnifier-mode="glass" data-lens-type="circle" data-lens-size="200">
                        <img src="images/hopetoun_falls.jpg">
                    </div>
                </div>
                <pre><code class="html">
                    &lt;div data-role="imagemagnifier"
                        data-magnifier-mode="glass"
                        data-lens-type="circle"
                        data-lens-size="200"
                    &gt;
                        &lt;img src="images/hopetoun_falls.jpg"&gt;
                    &lt;/div&gt;
                </code></pre>

                <!-- ads-html -->

                <h4 id="_im_zoom">Image magnifier zoom</h4>
                <p>
                    To create image magnifier <code>zoom</code>, you must add attribute <code>data-magnifier-mode="zoom"</code>.
                </p>
                <div class="example">
                    <div data-role="imagemagnifier" data-magnifier-mode="zoom" data-cls-zoom="mx-auto mt-4">
                        <img src="images/hopetoun_falls.jpg">
                    </div>
                </div>
                <pre><code class="html">
                    &lt;div data-role="imagemagnifier" data-magnifier-mode="zoom"&gt;
                        &lt;img src="images/hopetoun_falls.jpg"&gt;
                    &lt;/div&gt;
                </code></pre>

                <p>
                    You can define your one zoom element with attribute <code>data-zoom-element</code>.
                    To set, use right element selector.
                </p>

                <h3 id="_im_zooming">Zooming</h3>
                <p>
                    To change zooming of the lens, use attribute <code>data-magnifier-zoom</code>.
                    By default this attribute have a value <code>2</code>.
                    This attribute used for set zoom element size for image magnifier zoom.
                </p>

                <h3 id="_im_customize">Customize</h3>
                <p>
                    You can use attributes <code>data-cls-magnifier</code>, <code>data-cls-lens</code>, <code>data-cls-zoom</code> to customize magnifier  elements.
                </p>

            </main>
        </div>

    </div>

    <script src="docsearch/docsearch.min.js"></script>


    <script src="metro/js/metro.js?ver=@@b-version"></script>
    <script src="highlight/highlight.pack.js"></script>
    <script src="js/clipboard.min.js"></script>
    <script src="js/site.js"></script>
    <!-- ads-script -->
    <!-- ga-script -->
    <!-- hit-ua -->
</body>
</html>